﻿using System;
using System.ComponentModel.DataAnnotations;
using Furion.DatabaseAccessor;

namespace Cool.Core.Entities.System
{
    public class SysUser : DEntityBase
    {
        /// <summary>
        /// 部门ID
        /// </summary>
        public int DeptId { get; set; }

        /// <summary>
        /// 用户账号
        /// </summary>
        [Required, MaxLength(32)]
        public string UserName { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [MaxLength(32)]
        public string NickName { get; set; }

        /// <summary>
        /// 用户类型（00系统用户）
        /// </summary>
        [Required, MaxLength(32)]
        public string UserType { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [MaxLength(64)]
        public string Email { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        [MaxLength(32)]
        public string PhoneNumber { get; set; }

        /// <summary>
        /// 性别（0男 1女 2未知）
        /// </summary>
        public char Sex { get; set; }

        /// <summary>
        /// 头像地址
        /// </summary>
        [MaxLength(128)]
        public string Avatar { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [MaxLength(32)]
        public string Password { get; set; }

        /// <summary>
        /// 状态（0正常 1停用）
        /// </summary>
        public char Status { get; set; }

        /// <summary>
        /// 最后登录IP
        /// </summary>
        [MaxLength(32)]
        public string LoginIp { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LoginTime { get; set; }

    }
}
